﻿using System.Collections.ObjectModel;


namespace SilverlightHVP.ViewModel
{
   public class Set : Listable
   {
      public Set()
      {
         itemHolders = new ObservableCollection<ItemHolder>();
      }

      private ObservableCollection<ItemHolder> itemHolders;
      public ObservableCollection<ItemHolder> ItemHolders
      {
         get { return itemHolders; }
         set { itemHolders = value; }
      }
      public ObservableCollection<Item> Items
      {
         get
         {
            ObservableCollection<Item> items = new ObservableCollection<Item>();
            foreach ( ItemHolder i in ItemHolders )
            {
               items.Add( i.theItem );
            }
            return items;
         }
      }
   }
}
